{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 70,
   "id": "04840cb1-332c-4f83-aa4e-82502dcff1bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签\n",
    "plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "cc178b7d-c78c-4fa0-929b-148f8990b00d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>发货记录ID</th>\n",
       "      <th>调度安排计划ID</th>\n",
       "      <th>车辆信息ID</th>\n",
       "      <th>客户站点信息ID</th>\n",
       "      <th>客户下单ID</th>\n",
       "      <th>发货地信息ID</th>\n",
       "      <th>货品类型ID</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品品牌字典值</th>\n",
       "      <th>发货吨位</th>\n",
       "      <th>到站吨位</th>\n",
       "      <th>货物单价</th>\n",
       "      <th>货款</th>\n",
       "      <th>车辆信息ID.1</th>\n",
       "      <th>创建时间</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2509</td>\n",
       "      <td>3624</td>\n",
       "      <td>218</td>\n",
       "      <td>319</td>\n",
       "      <td>1978</td>\n",
       "      <td>103</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>38.38</td>\n",
       "      <td>0.0</td>\n",
       "      <td>207.0</td>\n",
       "      <td>7944.66</td>\n",
       "      <td>314</td>\n",
       "      <td>2022-07-21 07:10:48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2510</td>\n",
       "      <td>3637</td>\n",
       "      <td>107</td>\n",
       "      <td>93</td>\n",
       "      <td>1981</td>\n",
       "      <td>124</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>45.56</td>\n",
       "      <td>0.0</td>\n",
       "      <td>340.0</td>\n",
       "      <td>15490.40</td>\n",
       "      <td>241</td>\n",
       "      <td>2022-07-21 07:19:48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2514</td>\n",
       "      <td>3638</td>\n",
       "      <td>152</td>\n",
       "      <td>191</td>\n",
       "      <td>1986</td>\n",
       "      <td>121</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>43.84</td>\n",
       "      <td>0.0</td>\n",
       "      <td>320.0</td>\n",
       "      <td>14028.80</td>\n",
       "      <td>276</td>\n",
       "      <td>2022-07-21 10:49:34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2515</td>\n",
       "      <td>3639</td>\n",
       "      <td>152</td>\n",
       "      <td>191</td>\n",
       "      <td>1986</td>\n",
       "      <td>121</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>52.20</td>\n",
       "      <td>0.0</td>\n",
       "      <td>320.0</td>\n",
       "      <td>16704.00</td>\n",
       "      <td>257</td>\n",
       "      <td>2022-07-21 10:49:35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2516</td>\n",
       "      <td>3666</td>\n",
       "      <td>139</td>\n",
       "      <td>141</td>\n",
       "      <td>1998</td>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>32.32</td>\n",
       "      <td>0.0</td>\n",
       "      <td>292.0</td>\n",
       "      <td>9437.44</td>\n",
       "      <td>163</td>\n",
       "      <td>2022-07-21 11:23:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49870</th>\n",
       "      <td>60712</td>\n",
       "      <td>62734</td>\n",
       "      <td>461</td>\n",
       "      <td>744</td>\n",
       "      <td>32869</td>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>36.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>50.0</td>\n",
       "      <td>1800.00</td>\n",
       "      <td>1345</td>\n",
       "      <td>2024-06-24 13:28:49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49871</th>\n",
       "      <td>60713</td>\n",
       "      <td>62747</td>\n",
       "      <td>609</td>\n",
       "      <td>1145</td>\n",
       "      <td>32886</td>\n",
       "      <td>105</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>41.16</td>\n",
       "      <td>0.0</td>\n",
       "      <td>155.0</td>\n",
       "      <td>6379.80</td>\n",
       "      <td>106</td>\n",
       "      <td>2024-06-24 14:08:54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49872</th>\n",
       "      <td>60714</td>\n",
       "      <td>62748</td>\n",
       "      <td>103</td>\n",
       "      <td>87</td>\n",
       "      <td>32893</td>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>34.60</td>\n",
       "      <td>0.0</td>\n",
       "      <td>155.0</td>\n",
       "      <td>5363.00</td>\n",
       "      <td>226</td>\n",
       "      <td>2024-06-24 14:09:20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49873</th>\n",
       "      <td>60715</td>\n",
       "      <td>62745</td>\n",
       "      <td>201</td>\n",
       "      <td>892</td>\n",
       "      <td>32890</td>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>40.64</td>\n",
       "      <td>0.0</td>\n",
       "      <td>170.0</td>\n",
       "      <td>6908.80</td>\n",
       "      <td>125</td>\n",
       "      <td>2024-06-24 14:40:16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49874</th>\n",
       "      <td>60716</td>\n",
       "      <td>62744</td>\n",
       "      <td>388</td>\n",
       "      <td>1278</td>\n",
       "      <td>32911</td>\n",
       "      <td>105</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.68</td>\n",
       "      <td>0.0</td>\n",
       "      <td>150.0</td>\n",
       "      <td>5352.00</td>\n",
       "      <td>766</td>\n",
       "      <td>2024-06-24 15:07:41</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>49875 rows × 15 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       发货记录ID  调度安排计划ID  车辆信息ID  客户站点信息ID  客户下单ID  发货地信息ID  货品类型ID  产品规格字典值  \\\n",
       "0        2509      3624     218       319    1978      103       1        1   \n",
       "1        2510      3637     107        93    1981      124       0        0   \n",
       "2        2514      3638     152       191    1986      121       0        0   \n",
       "3        2515      3639     152       191    1986      121       0        0   \n",
       "4        2516      3666     139       141    1998      104       1        1   \n",
       "...       ...       ...     ...       ...     ...      ...     ...      ...   \n",
       "49870   60712     62734     461       744   32869      104       1        1   \n",
       "49871   60713     62747     609      1145   32886      105       1        1   \n",
       "49872   60714     62748     103        87   32893      104       1        1   \n",
       "49873   60715     62745     201       892   32890      104       1        1   \n",
       "49874   60716     62744     388      1278   32911      105       1        1   \n",
       "\n",
       "       产品品牌字典值   发货吨位  到站吨位   货物单价        货款  车辆信息ID.1                 创建时间  \n",
       "0            8  38.38   0.0  207.0   7944.66       314  2022-07-21 07:10:48  \n",
       "1            0  45.56   0.0  340.0  15490.40       241  2022-07-21 07:19:48  \n",
       "2            0  43.84   0.0  320.0  14028.80       276  2022-07-21 10:49:34  \n",
       "3            0  52.20   0.0  320.0  16704.00       257  2022-07-21 10:49:35  \n",
       "4            9  32.32   0.0  292.0   9437.44       163  2022-07-21 11:23:31  \n",
       "...        ...    ...   ...    ...       ...       ...                  ...  \n",
       "49870        9  36.00   0.0   50.0   1800.00      1345  2024-06-24 13:28:49  \n",
       "49871        9  41.16   0.0  155.0   6379.80       106  2024-06-24 14:08:54  \n",
       "49872        9  34.60   0.0  155.0   5363.00       226  2024-06-24 14:09:20  \n",
       "49873        9  40.64   0.0  170.0   6908.80       125  2024-06-24 14:40:16  \n",
       "49874        9  35.68   0.0  150.0   5352.00       766  2024-06-24 15:07:41  \n",
       "\n",
       "[49875 rows x 15 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1=pd.read_csv(\"数据/发货记录信息表.csv\")\n",
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5c18535c-b5c7-42bd-bda4-3aba62d0176c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>客户下单条目ID</th>\n",
       "      <th>客户信息ID</th>\n",
       "      <th>站点信息ID</th>\n",
       "      <th>货品类型字典值</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品品牌字典值</th>\n",
       "      <th>需求吨位</th>\n",
       "      <th>货运方式字典值</th>\n",
       "      <th>业务类型描述</th>\n",
       "      <th>发货地址ID</th>\n",
       "      <th>到站时间</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>46</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-13 15:59:10</td>\n",
       "      <td>xssb</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>745</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-29 05:46:42</td>\n",
       "      <td>DS0403001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>865</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-01 04:30:19</td>\n",
       "      <td>DS0403001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>928</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-02 10:46:07</td>\n",
       "      <td>DS0403001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>958</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>150.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-03 04:27:59</td>\n",
       "      <td>DS0403001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27948</th>\n",
       "      <td>32911</td>\n",
       "      <td>388</td>\n",
       "      <td>1278</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27949</th>\n",
       "      <td>32912</td>\n",
       "      <td>636</td>\n",
       "      <td>1211</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27950</th>\n",
       "      <td>32913</td>\n",
       "      <td>497</td>\n",
       "      <td>1274</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>42.36</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-05 08:05:00</td>\n",
       "      <td>chediao</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27951</th>\n",
       "      <td>32914</td>\n",
       "      <td>479</td>\n",
       "      <td>793</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0402003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27952</th>\n",
       "      <td>32915</td>\n",
       "      <td>546</td>\n",
       "      <td>979</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>配送 (贸易+运输)</td>\n",
       "      <td>105</td>\n",
       "      <td>2024-06-25 08:05:00</td>\n",
       "      <td>DS0403000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27953 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       客户下单条目ID  客户信息ID  站点信息ID  货品类型字典值  产品规格字典值  产品品牌字典值    需求吨位  货运方式字典值  \\\n",
       "0            79      37      46        0        0        0  100.00        1   \n",
       "1           745     141     276        0        0        0  100.00        1   \n",
       "2           865     141     276        0        0        0  200.00        1   \n",
       "3           928     141     276        0        0        0  200.00        1   \n",
       "4           958     141     276        0        0        0  150.00        1   \n",
       "...         ...     ...     ...      ...      ...      ...     ...      ...   \n",
       "27948     32911     388    1278        1        1        9   35.00        0   \n",
       "27949     32912     636    1211        1        1        9   35.00        0   \n",
       "27950     32913     497    1274        1        1        9   42.36        0   \n",
       "27951     32914     479     793        1        1        9   30.00        0   \n",
       "27952     32915     546     979        1        1        9   30.00        0   \n",
       "\n",
       "              业务类型描述  发货地址ID                 到站时间 创建该订单的我司销售人员  \n",
       "0      配送 (贸易+起驳+运输)     121  2022-06-13 15:59:10         xssb  \n",
       "1      配送 (贸易+起驳+运输)     121  2022-06-29 05:46:42    DS0403001  \n",
       "2      配送 (贸易+起驳+运输)     121  2022-07-01 04:30:19    DS0403001  \n",
       "3      配送 (贸易+起驳+运输)     121  2022-07-02 10:46:07    DS0403001  \n",
       "4      配送 (贸易+起驳+运输)     121  2022-07-03 04:27:59    DS0403001  \n",
       "...              ...     ...                  ...          ...  \n",
       "27948        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003  \n",
       "27949        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003  \n",
       "27950        自提 (贸易)     104  2024-06-05 08:05:00      chediao  \n",
       "27951        自提 (贸易)     104  2024-06-24 08:05:00    DS0402003  \n",
       "27952     配送 (贸易+运输)     105  2024-06-25 08:05:00    DS0403000  \n",
       "\n",
       "[27953 rows x 12 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2=pd.read_csv(\"数据/客户下单信息表.csv\")\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "647915c2-2c08-44ae-8a9c-a30b3c1d0757",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>发货记录ID</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2509</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2510</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2515</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49870</th>\n",
       "      <td>60712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49871</th>\n",
       "      <td>60713</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49872</th>\n",
       "      <td>60714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49873</th>\n",
       "      <td>60715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49874</th>\n",
       "      <td>60716</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>49875 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       发货记录ID\n",
       "0        2509\n",
       "1        2510\n",
       "2        2514\n",
       "3        2515\n",
       "4        2516\n",
       "...       ...\n",
       "49870   60712\n",
       "49871   60713\n",
       "49872   60714\n",
       "49873   60715\n",
       "49874   60716\n",
       "\n",
       "[49875 rows x 1 columns]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final=pd.DataFrame(df1[\"发货记录ID\"])\n",
    "final"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "c1ea610d-4061-4d29-9848-e10066a96924",
   "metadata": {},
   "outputs": [],
   "source": [
    "final[\"发货记录完成时间\"]=df1[\"创建时间\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "b3a7d3e2-bf38-4263-bb68-dad8181dbbd7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>发货记录ID</th>\n",
       "      <th>发货记录完成时间</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2509</td>\n",
       "      <td>2022-07-21 07:10:48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2510</td>\n",
       "      <td>2022-07-21 07:19:48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2514</td>\n",
       "      <td>2022-07-21 10:49:34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2515</td>\n",
       "      <td>2022-07-21 10:49:35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2516</td>\n",
       "      <td>2022-07-21 11:23:31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49870</th>\n",
       "      <td>60712</td>\n",
       "      <td>2024-06-24 13:28:49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49871</th>\n",
       "      <td>60713</td>\n",
       "      <td>2024-06-24 14:08:54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49872</th>\n",
       "      <td>60714</td>\n",
       "      <td>2024-06-24 14:09:20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49873</th>\n",
       "      <td>60715</td>\n",
       "      <td>2024-06-24 14:40:16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49874</th>\n",
       "      <td>60716</td>\n",
       "      <td>2024-06-24 15:07:41</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>49875 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       发货记录ID             发货记录完成时间\n",
       "0        2509  2022-07-21 07:10:48\n",
       "1        2510  2022-07-21 07:19:48\n",
       "2        2514  2022-07-21 10:49:34\n",
       "3        2515  2022-07-21 10:49:35\n",
       "4        2516  2022-07-21 11:23:31\n",
       "...       ...                  ...\n",
       "49870   60712  2024-06-24 13:28:49\n",
       "49871   60713  2024-06-24 14:08:54\n",
       "49872   60714  2024-06-24 14:09:20\n",
       "49873   60715  2024-06-24 14:40:16\n",
       "49874   60716  2024-06-24 15:07:41\n",
       "\n",
       "[49875 rows x 2 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "a28269e1-5f69-4250-b86f-034bcbd374ef",
   "metadata": {},
   "outputs": [],
   "source": [
    "final.to_excel(\"新.xlsx\",index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "58cc9efc-7a65-48f6-b3ff-eb05cfd74013",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "      <th>名称</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>admin</td>\n",
       "      <td>系统管理员1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>dsadmin</td>\n",
       "      <td>管理员</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>5</td>\n",
       "      <td>zhangsan</td>\n",
       "      <td>张三</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7</td>\n",
       "      <td>testuser</td>\n",
       "      <td>testuser</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>8</td>\n",
       "      <td>xs01</td>\n",
       "      <td>销售一</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>145</th>\n",
       "      <td>149</td>\n",
       "      <td>DS02005</td>\n",
       "      <td>袁义平</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>146</th>\n",
       "      <td>150</td>\n",
       "      <td>JCHS</td>\n",
       "      <td>荆楚宏盛</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>147</th>\n",
       "      <td>151</td>\n",
       "      <td>DS06004</td>\n",
       "      <td>高</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>148</th>\n",
       "      <td>152</td>\n",
       "      <td>测试客服</td>\n",
       "      <td>测试客服</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>149</th>\n",
       "      <td>154</td>\n",
       "      <td>testkf</td>\n",
       "      <td>testkf</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>150 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     user_id 创建该订单的我司销售人员        名称\n",
       "0          1        admin    系统管理员1\n",
       "1          4      dsadmin       管理员\n",
       "2          5     zhangsan        张三\n",
       "3          7     testuser  testuser\n",
       "4          8         xs01       销售一\n",
       "..       ...          ...       ...\n",
       "145      149      DS02005       袁义平\n",
       "146      150         JCHS      荆楚宏盛\n",
       "147      151      DS06004         高\n",
       "148      152         测试客服      测试客服\n",
       "149      154       testkf    testkf\n",
       "\n",
       "[150 rows x 3 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3=pd.read_csv(\"数据/系统用户表.csv\")\n",
    "df3.columns=[\"user_id\",\"创建该订单的我司销售人员\",\"名称\"]\n",
    "df3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "b7d5a47a-af96-4c92-8244-de2520ce5f7d",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged_df2 = pd.merge(df2, df3[['创建该订单的我司销售人员', '名称']], on='创建该订单的我司销售人员', how='left')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "bc47fdbe-4306-480c-8fba-fc66d6bc4f1b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>客户下单条目ID</th>\n",
       "      <th>客户信息ID</th>\n",
       "      <th>站点信息ID</th>\n",
       "      <th>货品类型字典值</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品品牌字典值</th>\n",
       "      <th>需求吨位</th>\n",
       "      <th>货运方式字典值</th>\n",
       "      <th>业务类型描述</th>\n",
       "      <th>发货地址ID</th>\n",
       "      <th>到站时间</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "      <th>名称</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>46</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-13 15:59:10</td>\n",
       "      <td>xssb</td>\n",
       "      <td>三部测试</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>745</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-29 05:46:42</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>865</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-01 04:30:19</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>928</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-02 10:46:07</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>958</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>150.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-03 04:27:59</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27948</th>\n",
       "      <td>32911</td>\n",
       "      <td>388</td>\n",
       "      <td>1278</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27949</th>\n",
       "      <td>32912</td>\n",
       "      <td>636</td>\n",
       "      <td>1211</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27950</th>\n",
       "      <td>32913</td>\n",
       "      <td>497</td>\n",
       "      <td>1274</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>42.36</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-05 08:05:00</td>\n",
       "      <td>chediao</td>\n",
       "      <td>调度室</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27951</th>\n",
       "      <td>32914</td>\n",
       "      <td>479</td>\n",
       "      <td>793</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0402003</td>\n",
       "      <td>甄常</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27952</th>\n",
       "      <td>32915</td>\n",
       "      <td>546</td>\n",
       "      <td>979</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>配送 (贸易+运输)</td>\n",
       "      <td>105</td>\n",
       "      <td>2024-06-25 08:05:00</td>\n",
       "      <td>DS0403000</td>\n",
       "      <td>李庭辉</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27953 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       客户下单条目ID  客户信息ID  站点信息ID  货品类型字典值  产品规格字典值  产品品牌字典值    需求吨位  货运方式字典值  \\\n",
       "0            79      37      46        0        0        0  100.00        1   \n",
       "1           745     141     276        0        0        0  100.00        1   \n",
       "2           865     141     276        0        0        0  200.00        1   \n",
       "3           928     141     276        0        0        0  200.00        1   \n",
       "4           958     141     276        0        0        0  150.00        1   \n",
       "...         ...     ...     ...      ...      ...      ...     ...      ...   \n",
       "27948     32911     388    1278        1        1        9   35.00        0   \n",
       "27949     32912     636    1211        1        1        9   35.00        0   \n",
       "27950     32913     497    1274        1        1        9   42.36        0   \n",
       "27951     32914     479     793        1        1        9   30.00        0   \n",
       "27952     32915     546     979        1        1        9   30.00        0   \n",
       "\n",
       "              业务类型描述  发货地址ID                 到站时间 创建该订单的我司销售人员    名称  \n",
       "0      配送 (贸易+起驳+运输)     121  2022-06-13 15:59:10         xssb  三部测试  \n",
       "1      配送 (贸易+起驳+运输)     121  2022-06-29 05:46:42    DS0403001   何义奎  \n",
       "2      配送 (贸易+起驳+运输)     121  2022-07-01 04:30:19    DS0403001   何义奎  \n",
       "3      配送 (贸易+起驳+运输)     121  2022-07-02 10:46:07    DS0403001   何义奎  \n",
       "4      配送 (贸易+起驳+运输)     121  2022-07-03 04:27:59    DS0403001   何义奎  \n",
       "...              ...     ...                  ...          ...   ...  \n",
       "27948        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹  \n",
       "27949        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹  \n",
       "27950        自提 (贸易)     104  2024-06-05 08:05:00      chediao   调度室  \n",
       "27951        自提 (贸易)     104  2024-06-24 08:05:00    DS0402003    甄常  \n",
       "27952     配送 (贸易+运输)     105  2024-06-25 08:05:00    DS0403000   李庭辉  \n",
       "\n",
       "[27953 rows x 13 columns]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged_df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "3784acd8-579e-4a3d-a2c6-27fd46a5d208",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>客户信息ID</th>\n",
       "      <th>客户名称</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>16</td>\n",
       "      <td>测试一下</td>\n",
       "      <td>DS04001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>18</td>\n",
       "      <td>武汉中村</td>\n",
       "      <td>DS0403003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>20</td>\n",
       "      <td>武汉昊恒(水泥)</td>\n",
       "      <td>DS0406000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>21</td>\n",
       "      <td>华安水泥(君善建)</td>\n",
       "      <td>DS0406000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>23</td>\n",
       "      <td>合力久盛(现金)</td>\n",
       "      <td>DS0404001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>532</th>\n",
       "      <td>646</td>\n",
       "      <td>新中环</td>\n",
       "      <td>DS0403000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>533</th>\n",
       "      <td>647</td>\n",
       "      <td>湖北联发水泥厂</td>\n",
       "      <td>DS0501003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>534</th>\n",
       "      <td>648</td>\n",
       "      <td>武汉宏新途远商贸有限公司</td>\n",
       "      <td>DS0405003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>535</th>\n",
       "      <td>649</td>\n",
       "      <td>慧迪（授信）</td>\n",
       "      <td>DS0401002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>536</th>\n",
       "      <td>650</td>\n",
       "      <td>华安水泥东湖分公司</td>\n",
       "      <td>DS0403003</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>537 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     客户信息ID          客户名称 创建该订单的我司销售人员\n",
       "0        16          测试一下      DS04001\n",
       "1        18          武汉中村    DS0403003\n",
       "2        20      武汉昊恒(水泥)    DS0406000\n",
       "3        21     华安水泥(君善建)    DS0406000\n",
       "4        23      合力久盛(现金)    DS0404001\n",
       "..      ...           ...          ...\n",
       "532     646           新中环    DS0403000\n",
       "533     647       湖北联发水泥厂    DS0501003\n",
       "534     648  武汉宏新途远商贸有限公司    DS0405003\n",
       "535     649        慧迪（授信）    DS0401002\n",
       "536     650     华安水泥东湖分公司    DS0403003\n",
       "\n",
       "[537 rows x 3 columns]"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df4=pd.read_csv(\"数据/客户信息表.csv\")\n",
    "df4.columns=[\"客户信息ID\",'客户名称','创建该订单的我司销售人员']\n",
    "df4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "6d18d33d-a98d-4cf8-acc9-d64f74f38417",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'pd' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[1], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m merged1_df2\u001b[38;5;241m=\u001b[39mpd\u001b[38;5;241m.\u001b[39mmerge(merged_df2, df4[[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m客户信息ID\u001b[39m\u001b[38;5;124m'\u001b[39m,\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m客户名称\u001b[39m\u001b[38;5;124m'\u001b[39m]], on\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m客户信息ID\u001b[39m\u001b[38;5;124m'\u001b[39m, how\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mouter\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m      2\u001b[0m merged1_df2\n",
      "\u001b[1;31mNameError\u001b[0m: name 'pd' is not defined"
     ]
    }
   ],
   "source": [
    "merged1_df2=pd.merge(merged_df2, df4[['客户信息ID','客户名称']], on='客户信息ID', how='outer')\n",
    "merged1_df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "93d7bda1-4615-4a89-a32b-31dbbef68760",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>发货地址ID</th>\n",
       "      <th>发货地类型</th>\n",
       "      <th>发货地名称</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1212</td>\n",
       "      <td>2</td>\n",
       "      <td>军山码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>128</td>\n",
       "      <td>2</td>\n",
       "      <td>江北码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>123</td>\n",
       "      <td>2</td>\n",
       "      <td>船厂码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>121</td>\n",
       "      <td>2</td>\n",
       "      <td>江南码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>124</td>\n",
       "      <td>2</td>\n",
       "      <td>德旺码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>126</td>\n",
       "      <td>2</td>\n",
       "      <td>勇顺码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1210</td>\n",
       "      <td>2</td>\n",
       "      <td>欣群燊码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1211</td>\n",
       "      <td>2</td>\n",
       "      <td>金口码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1118</td>\n",
       "      <td>1</td>\n",
       "      <td>中万德旺库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1117</td>\n",
       "      <td>1</td>\n",
       "      <td>海螺军山库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1116</td>\n",
       "      <td>1</td>\n",
       "      <td>盈通方达金口库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1112</td>\n",
       "      <td>1</td>\n",
       "      <td>荆楚宏盛江北库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>1111</td>\n",
       "      <td>1</td>\n",
       "      <td>盈通方达军山库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>1110</td>\n",
       "      <td>1</td>\n",
       "      <td>盈通方达江南库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>118</td>\n",
       "      <td>1</td>\n",
       "      <td>荆楚宏盛江南库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>116</td>\n",
       "      <td>1</td>\n",
       "      <td>欣群燊库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>1019</td>\n",
       "      <td>0</td>\n",
       "      <td>娲石水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1020</td>\n",
       "      <td>0</td>\n",
       "      <td>海螺军山库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>1018</td>\n",
       "      <td>0</td>\n",
       "      <td>三峡水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>117</td>\n",
       "      <td>1</td>\n",
       "      <td>荆楚宏盛汉阳库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>111</td>\n",
       "      <td>1</td>\n",
       "      <td>江南码头1号仓库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>113</td>\n",
       "      <td>1</td>\n",
       "      <td>德旺码头1号仓库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>114</td>\n",
       "      <td>1</td>\n",
       "      <td>德旺码头2号仓库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>115</td>\n",
       "      <td>1</td>\n",
       "      <td>李良忠库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>1010</td>\n",
       "      <td>0</td>\n",
       "      <td>三峡嘉鱼</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>106</td>\n",
       "      <td>0</td>\n",
       "      <td>华新</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>1114</td>\n",
       "      <td>1</td>\n",
       "      <td>江南码头1号仓库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1113</td>\n",
       "      <td>1</td>\n",
       "      <td>盈通方达军山库（金盛兰）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>104</td>\n",
       "      <td>0</td>\n",
       "      <td>武新一期</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>105</td>\n",
       "      <td>0</td>\n",
       "      <td>武新二期</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>103</td>\n",
       "      <td>0</td>\n",
       "      <td>金盛兰</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>112</td>\n",
       "      <td>1</td>\n",
       "      <td>江南码头2号仓库</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>1013</td>\n",
       "      <td>0</td>\n",
       "      <td>鄂钢嘉华</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>1014</td>\n",
       "      <td>0</td>\n",
       "      <td>鑫缘</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    发货地址ID  发货地类型         发货地名称\n",
       "0     1212      2          军山码头\n",
       "1      128      2          江北码头\n",
       "2      123      2          船厂码头\n",
       "3      121      2          江南码头\n",
       "4      124      2          德旺码头\n",
       "5      126      2          勇顺码头\n",
       "6     1210      2         欣群燊码头\n",
       "7     1211      2          金口码头\n",
       "8     1118      1         中万德旺库\n",
       "9     1117      1         海螺军山库\n",
       "10    1116      1       盈通方达金口库\n",
       "11    1112      1       荆楚宏盛江北库\n",
       "12    1111      1       盈通方达军山库\n",
       "13    1110      1       盈通方达江南库\n",
       "14     118      1       荆楚宏盛江南库\n",
       "15     116      1          欣群燊库\n",
       "16    1019      0          娲石水泥\n",
       "17    1020      0         海螺军山库\n",
       "18    1018      0          三峡水泥\n",
       "19     117      1       荆楚宏盛汉阳库\n",
       "20     111      1      江南码头1号仓库\n",
       "21     113      1      德旺码头1号仓库\n",
       "22     114      1      德旺码头2号仓库\n",
       "23     115      1          李良忠库\n",
       "24    1010      0          三峡嘉鱼\n",
       "25     106      0            华新\n",
       "26    1114      1      江南码头1号仓库\n",
       "27    1113      1  盈通方达军山库（金盛兰）\n",
       "28     104      0          武新一期\n",
       "29     105      0          武新二期\n",
       "30     103      0           金盛兰\n",
       "31     112      1      江南码头2号仓库\n",
       "32    1013      0          鄂钢嘉华\n",
       "33    1014      0            鑫缘"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df5=pd.read_csv(\"数据/发货地信息表.csv\")\n",
    "df5.columns=[\"发货地址ID\",\"发货地类型\",\"发货地名称\"]\n",
    "df5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "8373bcb2-18f7-48d8-9297-9f1907848a25",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>客户下单条目ID</th>\n",
       "      <th>客户信息ID</th>\n",
       "      <th>站点信息ID</th>\n",
       "      <th>货品类型字典值</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品品牌字典值</th>\n",
       "      <th>需求吨位</th>\n",
       "      <th>货运方式字典值</th>\n",
       "      <th>业务类型描述</th>\n",
       "      <th>发货地址ID</th>\n",
       "      <th>到站时间</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "      <th>名称</th>\n",
       "      <th>客户名称</th>\n",
       "      <th>发货地名称</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>46</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-13 15:59:10</td>\n",
       "      <td>xssb</td>\n",
       "      <td>三部测试</td>\n",
       "      <td>NaN</td>\n",
       "      <td>江南码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>745</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-29 05:46:42</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>865</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-01 04:30:19</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>928</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-02 10:46:07</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>958</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>150.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-03 04:27:59</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27948</th>\n",
       "      <td>32911</td>\n",
       "      <td>388</td>\n",
       "      <td>1278</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "      <td>泽麟建材</td>\n",
       "      <td>武新一期</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27949</th>\n",
       "      <td>32912</td>\n",
       "      <td>636</td>\n",
       "      <td>1211</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "      <td>枣阳翔吉顺</td>\n",
       "      <td>武新一期</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27950</th>\n",
       "      <td>32913</td>\n",
       "      <td>497</td>\n",
       "      <td>1274</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>42.36</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-05 08:05:00</td>\n",
       "      <td>chediao</td>\n",
       "      <td>调度室</td>\n",
       "      <td>志扬云睿</td>\n",
       "      <td>武新一期</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27951</th>\n",
       "      <td>32914</td>\n",
       "      <td>479</td>\n",
       "      <td>793</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0402003</td>\n",
       "      <td>甄常</td>\n",
       "      <td>荟聚源</td>\n",
       "      <td>武新一期</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27952</th>\n",
       "      <td>32915</td>\n",
       "      <td>546</td>\n",
       "      <td>979</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>配送 (贸易+运输)</td>\n",
       "      <td>105</td>\n",
       "      <td>2024-06-25 08:05:00</td>\n",
       "      <td>DS0403000</td>\n",
       "      <td>李庭辉</td>\n",
       "      <td>湖北玖伍建材</td>\n",
       "      <td>武新二期</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27953 rows × 15 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       客户下单条目ID  客户信息ID  站点信息ID  货品类型字典值  产品规格字典值  产品品牌字典值    需求吨位  货运方式字典值  \\\n",
       "0            79      37      46        0        0        0  100.00        1   \n",
       "1           745     141     276        0        0        0  100.00        1   \n",
       "2           865     141     276        0        0        0  200.00        1   \n",
       "3           928     141     276        0        0        0  200.00        1   \n",
       "4           958     141     276        0        0        0  150.00        1   \n",
       "...         ...     ...     ...      ...      ...      ...     ...      ...   \n",
       "27948     32911     388    1278        1        1        9   35.00        0   \n",
       "27949     32912     636    1211        1        1        9   35.00        0   \n",
       "27950     32913     497    1274        1        1        9   42.36        0   \n",
       "27951     32914     479     793        1        1        9   30.00        0   \n",
       "27952     32915     546     979        1        1        9   30.00        0   \n",
       "\n",
       "              业务类型描述  发货地址ID                 到站时间 创建该订单的我司销售人员    名称    客户名称  \\\n",
       "0      配送 (贸易+起驳+运输)     121  2022-06-13 15:59:10         xssb  三部测试     NaN   \n",
       "1      配送 (贸易+起驳+运输)     121  2022-06-29 05:46:42    DS0403001   何义奎     盛华鑫   \n",
       "2      配送 (贸易+起驳+运输)     121  2022-07-01 04:30:19    DS0403001   何义奎     盛华鑫   \n",
       "3      配送 (贸易+起驳+运输)     121  2022-07-02 10:46:07    DS0403001   何义奎     盛华鑫   \n",
       "4      配送 (贸易+起驳+运输)     121  2022-07-03 04:27:59    DS0403001   何义奎     盛华鑫   \n",
       "...              ...     ...                  ...          ...   ...     ...   \n",
       "27948        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹    泽麟建材   \n",
       "27949        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹   枣阳翔吉顺   \n",
       "27950        自提 (贸易)     104  2024-06-05 08:05:00      chediao   调度室    志扬云睿   \n",
       "27951        自提 (贸易)     104  2024-06-24 08:05:00    DS0402003    甄常     荟聚源   \n",
       "27952     配送 (贸易+运输)     105  2024-06-25 08:05:00    DS0403000   李庭辉  湖北玖伍建材   \n",
       "\n",
       "      发货地名称  \n",
       "0      江南码头  \n",
       "1      江南码头  \n",
       "2      江南码头  \n",
       "3      江南码头  \n",
       "4      江南码头  \n",
       "...     ...  \n",
       "27948  武新一期  \n",
       "27949  武新一期  \n",
       "27950  武新一期  \n",
       "27951  武新一期  \n",
       "27952  武新二期  \n",
       "\n",
       "[27953 rows x 15 columns]"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged2_df2=pd.merge(merged1_df2, df5[['发货地址ID','发货地名称']], on='发货地址ID', how='left')\n",
    "merged2_df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "d7d2876b-e196-4ca6-a058-dadba57e2a8b",
   "metadata": {},
   "outputs": [],
   "source": [
    "df6=pd.DataFrame({\"货品类型\":[\"水泥\",\"矿粉\"]},index=[0,1])\n",
    "df6[\"货品类型字典值\"]=[0,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "abe0438d-7e82-470c-bde1-e721b3988ade",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>货品类型</th>\n",
       "      <th>货品类型字典值</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>水泥</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>矿粉</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  货品类型  货品类型字典值\n",
       "0   水泥        0\n",
       "1   矿粉        1"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "5365e6c4-5d02-4f6d-a829-3876d948146d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>客户下单条目ID</th>\n",
       "      <th>客户信息ID</th>\n",
       "      <th>站点信息ID</th>\n",
       "      <th>货品类型字典值</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品品牌字典值</th>\n",
       "      <th>需求吨位</th>\n",
       "      <th>货运方式字典值</th>\n",
       "      <th>业务类型描述</th>\n",
       "      <th>发货地址ID</th>\n",
       "      <th>到站时间</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "      <th>名称</th>\n",
       "      <th>客户名称</th>\n",
       "      <th>发货地名称</th>\n",
       "      <th>货品类型</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>46</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-13 15:59:10</td>\n",
       "      <td>xssb</td>\n",
       "      <td>三部测试</td>\n",
       "      <td>NaN</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>745</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-29 05:46:42</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>865</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-01 04:30:19</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>928</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-02 10:46:07</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>958</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>150.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-03 04:27:59</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27948</th>\n",
       "      <td>32911</td>\n",
       "      <td>388</td>\n",
       "      <td>1278</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "      <td>泽麟建材</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27949</th>\n",
       "      <td>32912</td>\n",
       "      <td>636</td>\n",
       "      <td>1211</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "      <td>枣阳翔吉顺</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27950</th>\n",
       "      <td>32913</td>\n",
       "      <td>497</td>\n",
       "      <td>1274</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>42.36</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-05 08:05:00</td>\n",
       "      <td>chediao</td>\n",
       "      <td>调度室</td>\n",
       "      <td>志扬云睿</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27951</th>\n",
       "      <td>32914</td>\n",
       "      <td>479</td>\n",
       "      <td>793</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0402003</td>\n",
       "      <td>甄常</td>\n",
       "      <td>荟聚源</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27952</th>\n",
       "      <td>32915</td>\n",
       "      <td>546</td>\n",
       "      <td>979</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>配送 (贸易+运输)</td>\n",
       "      <td>105</td>\n",
       "      <td>2024-06-25 08:05:00</td>\n",
       "      <td>DS0403000</td>\n",
       "      <td>李庭辉</td>\n",
       "      <td>湖北玖伍建材</td>\n",
       "      <td>武新二期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27953 rows × 16 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       客户下单条目ID  客户信息ID  站点信息ID  货品类型字典值  产品规格字典值  产品品牌字典值    需求吨位  货运方式字典值  \\\n",
       "0            79      37      46        0        0        0  100.00        1   \n",
       "1           745     141     276        0        0        0  100.00        1   \n",
       "2           865     141     276        0        0        0  200.00        1   \n",
       "3           928     141     276        0        0        0  200.00        1   \n",
       "4           958     141     276        0        0        0  150.00        1   \n",
       "...         ...     ...     ...      ...      ...      ...     ...      ...   \n",
       "27948     32911     388    1278        1        1        9   35.00        0   \n",
       "27949     32912     636    1211        1        1        9   35.00        0   \n",
       "27950     32913     497    1274        1        1        9   42.36        0   \n",
       "27951     32914     479     793        1        1        9   30.00        0   \n",
       "27952     32915     546     979        1        1        9   30.00        0   \n",
       "\n",
       "              业务类型描述  发货地址ID                 到站时间 创建该订单的我司销售人员    名称    客户名称  \\\n",
       "0      配送 (贸易+起驳+运输)     121  2022-06-13 15:59:10         xssb  三部测试     NaN   \n",
       "1      配送 (贸易+起驳+运输)     121  2022-06-29 05:46:42    DS0403001   何义奎     盛华鑫   \n",
       "2      配送 (贸易+起驳+运输)     121  2022-07-01 04:30:19    DS0403001   何义奎     盛华鑫   \n",
       "3      配送 (贸易+起驳+运输)     121  2022-07-02 10:46:07    DS0403001   何义奎     盛华鑫   \n",
       "4      配送 (贸易+起驳+运输)     121  2022-07-03 04:27:59    DS0403001   何义奎     盛华鑫   \n",
       "...              ...     ...                  ...          ...   ...     ...   \n",
       "27948        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹    泽麟建材   \n",
       "27949        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹   枣阳翔吉顺   \n",
       "27950        自提 (贸易)     104  2024-06-05 08:05:00      chediao   调度室    志扬云睿   \n",
       "27951        自提 (贸易)     104  2024-06-24 08:05:00    DS0402003    甄常     荟聚源   \n",
       "27952     配送 (贸易+运输)     105  2024-06-25 08:05:00    DS0403000   李庭辉  湖北玖伍建材   \n",
       "\n",
       "      发货地名称 货品类型  \n",
       "0      江南码头   水泥  \n",
       "1      江南码头   水泥  \n",
       "2      江南码头   水泥  \n",
       "3      江南码头   水泥  \n",
       "4      江南码头   水泥  \n",
       "...     ...  ...  \n",
       "27948  武新一期   矿粉  \n",
       "27949  武新一期   矿粉  \n",
       "27950  武新一期   矿粉  \n",
       "27951  武新一期   矿粉  \n",
       "27952  武新二期   矿粉  \n",
       "\n",
       "[27953 rows x 16 columns]"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged3_df2=pd.merge(merged2_df2, df6[['货品类型','货品类型字典值']], on='货品类型字典值', how='left')\n",
    "merged3_df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "b5d62890-65e3-47a6-8658-bb5700fd067b",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged4_df2 = merged3_df2.drop(columns='货品类型字典值')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "b3344fff-5f9f-444d-b006-3d1fabd7bd8d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>客户下单条目ID</th>\n",
       "      <th>客户信息ID</th>\n",
       "      <th>站点信息ID</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品品牌字典值</th>\n",
       "      <th>需求吨位</th>\n",
       "      <th>货运方式字典值</th>\n",
       "      <th>业务类型描述</th>\n",
       "      <th>发货地址ID</th>\n",
       "      <th>到站时间</th>\n",
       "      <th>创建该订单的我司销售人员</th>\n",
       "      <th>名称</th>\n",
       "      <th>客户名称</th>\n",
       "      <th>发货地名称</th>\n",
       "      <th>货品类型</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>79</td>\n",
       "      <td>37</td>\n",
       "      <td>46</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-13 15:59:10</td>\n",
       "      <td>xssb</td>\n",
       "      <td>三部测试</td>\n",
       "      <td>NaN</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>745</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-06-29 05:46:42</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>865</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-01 04:30:19</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>928</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>200.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-02 10:46:07</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>958</td>\n",
       "      <td>141</td>\n",
       "      <td>276</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>150.00</td>\n",
       "      <td>1</td>\n",
       "      <td>配送 (贸易+起驳+运输)</td>\n",
       "      <td>121</td>\n",
       "      <td>2022-07-03 04:27:59</td>\n",
       "      <td>DS0403001</td>\n",
       "      <td>何义奎</td>\n",
       "      <td>盛华鑫</td>\n",
       "      <td>江南码头</td>\n",
       "      <td>水泥</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27948</th>\n",
       "      <td>32911</td>\n",
       "      <td>388</td>\n",
       "      <td>1278</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "      <td>泽麟建材</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27949</th>\n",
       "      <td>32912</td>\n",
       "      <td>636</td>\n",
       "      <td>1211</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0403003</td>\n",
       "      <td>史丹</td>\n",
       "      <td>枣阳翔吉顺</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27950</th>\n",
       "      <td>32913</td>\n",
       "      <td>497</td>\n",
       "      <td>1274</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>42.36</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-05 08:05:00</td>\n",
       "      <td>chediao</td>\n",
       "      <td>调度室</td>\n",
       "      <td>志扬云睿</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27951</th>\n",
       "      <td>32914</td>\n",
       "      <td>479</td>\n",
       "      <td>793</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>自提 (贸易)</td>\n",
       "      <td>104</td>\n",
       "      <td>2024-06-24 08:05:00</td>\n",
       "      <td>DS0402003</td>\n",
       "      <td>甄常</td>\n",
       "      <td>荟聚源</td>\n",
       "      <td>武新一期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27952</th>\n",
       "      <td>32915</td>\n",
       "      <td>546</td>\n",
       "      <td>979</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>30.00</td>\n",
       "      <td>0</td>\n",
       "      <td>配送 (贸易+运输)</td>\n",
       "      <td>105</td>\n",
       "      <td>2024-06-25 08:05:00</td>\n",
       "      <td>DS0403000</td>\n",
       "      <td>李庭辉</td>\n",
       "      <td>湖北玖伍建材</td>\n",
       "      <td>武新二期</td>\n",
       "      <td>矿粉</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>27953 rows × 15 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       客户下单条目ID  客户信息ID  站点信息ID  产品规格字典值  产品品牌字典值    需求吨位  货运方式字典值  \\\n",
       "0            79      37      46        0        0  100.00        1   \n",
       "1           745     141     276        0        0  100.00        1   \n",
       "2           865     141     276        0        0  200.00        1   \n",
       "3           928     141     276        0        0  200.00        1   \n",
       "4           958     141     276        0        0  150.00        1   \n",
       "...         ...     ...     ...      ...      ...     ...      ...   \n",
       "27948     32911     388    1278        1        9   35.00        0   \n",
       "27949     32912     636    1211        1        9   35.00        0   \n",
       "27950     32913     497    1274        1        9   42.36        0   \n",
       "27951     32914     479     793        1        9   30.00        0   \n",
       "27952     32915     546     979        1        9   30.00        0   \n",
       "\n",
       "              业务类型描述  发货地址ID                 到站时间 创建该订单的我司销售人员    名称    客户名称  \\\n",
       "0      配送 (贸易+起驳+运输)     121  2022-06-13 15:59:10         xssb  三部测试     NaN   \n",
       "1      配送 (贸易+起驳+运输)     121  2022-06-29 05:46:42    DS0403001   何义奎     盛华鑫   \n",
       "2      配送 (贸易+起驳+运输)     121  2022-07-01 04:30:19    DS0403001   何义奎     盛华鑫   \n",
       "3      配送 (贸易+起驳+运输)     121  2022-07-02 10:46:07    DS0403001   何义奎     盛华鑫   \n",
       "4      配送 (贸易+起驳+运输)     121  2022-07-03 04:27:59    DS0403001   何义奎     盛华鑫   \n",
       "...              ...     ...                  ...          ...   ...     ...   \n",
       "27948        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹    泽麟建材   \n",
       "27949        自提 (贸易)     104  2024-06-24 08:05:00    DS0403003    史丹   枣阳翔吉顺   \n",
       "27950        自提 (贸易)     104  2024-06-05 08:05:00      chediao   调度室    志扬云睿   \n",
       "27951        自提 (贸易)     104  2024-06-24 08:05:00    DS0402003    甄常     荟聚源   \n",
       "27952     配送 (贸易+运输)     105  2024-06-25 08:05:00    DS0403000   李庭辉  湖北玖伍建材   \n",
       "\n",
       "      发货地名称 货品类型  \n",
       "0      江南码头   水泥  \n",
       "1      江南码头   水泥  \n",
       "2      江南码头   水泥  \n",
       "3      江南码头   水泥  \n",
       "4      江南码头   水泥  \n",
       "...     ...  ...  \n",
       "27948  武新一期   矿粉  \n",
       "27949  武新一期   矿粉  \n",
       "27950  武新一期   矿粉  \n",
       "27951  武新一期   矿粉  \n",
       "27952  武新二期   矿粉  \n",
       "\n",
       "[27953 rows x 15 columns]"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "merged4_df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "60a6c9bd-8753-41f0-aef6-8862c237229b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>dict_type</th>\n",
       "      <th>dict_value</th>\n",
       "      <th>dict_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>sys_user_sex</td>\n",
       "      <td>0</td>\n",
       "      <td>男</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>sys_user_sex</td>\n",
       "      <td>1</td>\n",
       "      <td>女</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>sys_user_sex</td>\n",
       "      <td>2</td>\n",
       "      <td>未知</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>sys_show_hide</td>\n",
       "      <td>0</td>\n",
       "      <td>显示</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>sys_show_hide</td>\n",
       "      <td>1</td>\n",
       "      <td>隐藏</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>745</td>\n",
       "      <td>ERP_CPGG</td>\n",
       "      <td>0</td>\n",
       "      <td>P.O42.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>262</th>\n",
       "      <td>746</td>\n",
       "      <td>ERP_CPGG</td>\n",
       "      <td>1</td>\n",
       "      <td>S95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>263</th>\n",
       "      <td>747</td>\n",
       "      <td>ERP_CPGG</td>\n",
       "      <td>2</td>\n",
       "      <td>V800(袋装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>748</td>\n",
       "      <td>ERP_CPGG</td>\n",
       "      <td>3</td>\n",
       "      <td>V800(散装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>265</th>\n",
       "      <td>749</td>\n",
       "      <td>ERP_CPGG</td>\n",
       "      <td>4</td>\n",
       "      <td>PO52.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>266 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      id      dict_type dict_value dict_label\n",
       "0      1   sys_user_sex          0          男\n",
       "1      2   sys_user_sex          1          女\n",
       "2      3   sys_user_sex          2         未知\n",
       "3      4  sys_show_hide          0         显示\n",
       "4      5  sys_show_hide          1         隐藏\n",
       "..   ...            ...        ...        ...\n",
       "261  745       ERP_CPGG          0    P.O42.5\n",
       "262  746       ERP_CPGG          1        S95\n",
       "263  747       ERP_CPGG          2   V800(袋装)\n",
       "264  748       ERP_CPGG          3   V800(散装)\n",
       "265  749       ERP_CPGG          4     PO52.5\n",
       "\n",
       "[266 rows x 4 columns]"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df7=pd.read_csv(\"数据/系统字典表.csv\")\n",
    "df7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "5d08a23b-d525-426e-8af3-92e475cd656b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dict_value</th>\n",
       "      <th>dict_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>0</td>\n",
       "      <td>P.O42.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>262</th>\n",
       "      <td>1</td>\n",
       "      <td>S95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>263</th>\n",
       "      <td>2</td>\n",
       "      <td>V800(袋装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>3</td>\n",
       "      <td>V800(散装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>265</th>\n",
       "      <td>4</td>\n",
       "      <td>PO52.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    dict_value dict_label\n",
       "261          0    P.O42.5\n",
       "262          1        S95\n",
       "263          2   V800(袋装)\n",
       "264          3   V800(散装)\n",
       "265          4     PO52.5"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_erp_only = df7[df7['dict_type'] == 'ERP_CPGG']\n",
    "df_erp_only=df_erp_only.drop(columns=[\"id\",\"dict_type\"])\n",
    "df_erp_only"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "73ecc47f-0474-4c90-8677-9425e2ab925b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dict_value</th>\n",
       "      <th>dict_label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>0</td>\n",
       "      <td>P.O42.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>262</th>\n",
       "      <td>1</td>\n",
       "      <td>S95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>263</th>\n",
       "      <td>2</td>\n",
       "      <td>V800(袋装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>3</td>\n",
       "      <td>V800(散装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>265</th>\n",
       "      <td>4</td>\n",
       "      <td>PO52.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    dict_value dict_label\n",
       "261          0    P.O42.5\n",
       "262          1        S95\n",
       "263          2   V800(袋装)\n",
       "264          3   V800(散装)\n",
       "265          4     PO52.5"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_copy =df_erp_only.copy()  \n",
    "df_copy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "f2923eef-18bd-47e3-88e3-3ea0001774c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>dict_value</th>\n",
       "      <th>dict_label</th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品规格</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>0</td>\n",
       "      <td>P.O42.5</td>\n",
       "      <td>0</td>\n",
       "      <td>P.O42.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>262</th>\n",
       "      <td>1</td>\n",
       "      <td>S95</td>\n",
       "      <td>1</td>\n",
       "      <td>S95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>263</th>\n",
       "      <td>2</td>\n",
       "      <td>V800(袋装)</td>\n",
       "      <td>2</td>\n",
       "      <td>V800(袋装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>3</td>\n",
       "      <td>V800(散装)</td>\n",
       "      <td>3</td>\n",
       "      <td>V800(散装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>265</th>\n",
       "      <td>4</td>\n",
       "      <td>PO52.5</td>\n",
       "      <td>4</td>\n",
       "      <td>PO52.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    dict_value dict_label 产品规格字典值      产品规格\n",
       "261          0    P.O42.5       0   P.O42.5\n",
       "262          1        S95       1       S95\n",
       "263          2   V800(袋装)       2  V800(袋装)\n",
       "264          3   V800(散装)       3  V800(散装)\n",
       "265          4     PO52.5       4    PO52.5"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_copy[\"产品规格字典值\"]=df_copy[\"dict_value\"]\n",
    "df_copy[\"产品规格\"]=df_copy[\"dict_label\"]\n",
    "df_copy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "9d5dfe91-9b81-4849-8d94-38a8b158b15d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>产品规格字典值</th>\n",
       "      <th>产品规格</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>261</th>\n",
       "      <td>0</td>\n",
       "      <td>P.O42.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>262</th>\n",
       "      <td>1</td>\n",
       "      <td>S95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>263</th>\n",
       "      <td>2</td>\n",
       "      <td>V800(袋装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>264</th>\n",
       "      <td>3</td>\n",
       "      <td>V800(散装)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>265</th>\n",
       "      <td>4</td>\n",
       "      <td>PO52.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    产品规格字典值      产品规格\n",
       "261       0   P.O42.5\n",
       "262       1       S95\n",
       "263       2  V800(袋装)\n",
       "264       3  V800(散装)\n",
       "265       4    PO52.5"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_copy=df_copy.drop(columns=['dict_value','dict_label'])\n",
    "df_copy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "5d83a2cb-d036-41c1-9b7d-4225b3d98b14",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_copy.to_excel(\"copy.xlsx\",index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "3b3663ea-4939-4c5b-9995-e64eeff5ccee",
   "metadata": {},
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "You are trying to merge on int64 and object columns for key '产品规格字典值'. If you wish to proceed you should use pd.concat",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[66], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m merged5_df2\u001b[38;5;241m=\u001b[39mpd\u001b[38;5;241m.\u001b[39mmerge(merged4_df2, df_copy[[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m产品规格字典值\u001b[39m\u001b[38;5;124m'\u001b[39m,\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m产品规格\u001b[39m\u001b[38;5;124m'\u001b[39m]], on\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m产品规格字典值\u001b[39m\u001b[38;5;124m'\u001b[39m, how\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mleft\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m      2\u001b[0m merged5_df2\n",
      "File \u001b[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\reshape\\merge.py:169\u001b[0m, in \u001b[0;36mmerge\u001b[1;34m(left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, copy, indicator, validate)\u001b[0m\n\u001b[0;32m    154\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m _cross_merge(\n\u001b[0;32m    155\u001b[0m         left_df,\n\u001b[0;32m    156\u001b[0m         right_df,\n\u001b[1;32m   (...)\u001b[0m\n\u001b[0;32m    166\u001b[0m         copy\u001b[38;5;241m=\u001b[39mcopy,\n\u001b[0;32m    167\u001b[0m     )\n\u001b[0;32m    168\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m--> 169\u001b[0m     op \u001b[38;5;241m=\u001b[39m _MergeOperation(\n\u001b[0;32m    170\u001b[0m         left_df,\n\u001b[0;32m    171\u001b[0m         right_df,\n\u001b[0;32m    172\u001b[0m         how\u001b[38;5;241m=\u001b[39mhow,\n\u001b[0;32m    173\u001b[0m         on\u001b[38;5;241m=\u001b[39mon,\n\u001b[0;32m    174\u001b[0m         left_on\u001b[38;5;241m=\u001b[39mleft_on,\n\u001b[0;32m    175\u001b[0m         right_on\u001b[38;5;241m=\u001b[39mright_on,\n\u001b[0;32m    176\u001b[0m         left_index\u001b[38;5;241m=\u001b[39mleft_index,\n\u001b[0;32m    177\u001b[0m         right_index\u001b[38;5;241m=\u001b[39mright_index,\n\u001b[0;32m    178\u001b[0m         sort\u001b[38;5;241m=\u001b[39msort,\n\u001b[0;32m    179\u001b[0m         suffixes\u001b[38;5;241m=\u001b[39msuffixes,\n\u001b[0;32m    180\u001b[0m         indicator\u001b[38;5;241m=\u001b[39mindicator,\n\u001b[0;32m    181\u001b[0m         validate\u001b[38;5;241m=\u001b[39mvalidate,\n\u001b[0;32m    182\u001b[0m     )\n\u001b[0;32m    183\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m op\u001b[38;5;241m.\u001b[39mget_result(copy\u001b[38;5;241m=\u001b[39mcopy)\n",
      "File \u001b[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\reshape\\merge.py:804\u001b[0m, in \u001b[0;36m_MergeOperation.__init__\u001b[1;34m(self, left, right, how, on, left_on, right_on, left_index, right_index, sort, suffixes, indicator, validate)\u001b[0m\n\u001b[0;32m    800\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_validate_tolerance(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mleft_join_keys)\n\u001b[0;32m    802\u001b[0m \u001b[38;5;66;03m# validate the merge keys dtypes. We may need to coerce\u001b[39;00m\n\u001b[0;32m    803\u001b[0m \u001b[38;5;66;03m# to avoid incompatible dtypes\u001b[39;00m\n\u001b[1;32m--> 804\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_maybe_coerce_merge_keys()\n\u001b[0;32m    806\u001b[0m \u001b[38;5;66;03m# If argument passed to validate,\u001b[39;00m\n\u001b[0;32m    807\u001b[0m \u001b[38;5;66;03m# check if columns specified as unique\u001b[39;00m\n\u001b[0;32m    808\u001b[0m \u001b[38;5;66;03m# are in fact unique.\u001b[39;00m\n\u001b[0;32m    809\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m validate \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n",
      "File \u001b[1;32mD:\\Anaconda\\Lib\\site-packages\\pandas\\core\\reshape\\merge.py:1479\u001b[0m, in \u001b[0;36m_MergeOperation._maybe_coerce_merge_keys\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m   1473\u001b[0m     \u001b[38;5;66;03m# unless we are merging non-string-like with string-like\u001b[39;00m\n\u001b[0;32m   1474\u001b[0m     \u001b[38;5;28;01melif\u001b[39;00m (\n\u001b[0;32m   1475\u001b[0m         inferred_left \u001b[38;5;129;01min\u001b[39;00m string_types \u001b[38;5;129;01mand\u001b[39;00m inferred_right \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m string_types\n\u001b[0;32m   1476\u001b[0m     ) \u001b[38;5;129;01mor\u001b[39;00m (\n\u001b[0;32m   1477\u001b[0m         inferred_right \u001b[38;5;129;01min\u001b[39;00m string_types \u001b[38;5;129;01mand\u001b[39;00m inferred_left \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m string_types\n\u001b[0;32m   1478\u001b[0m     ):\n\u001b[1;32m-> 1479\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(msg)\n\u001b[0;32m   1481\u001b[0m \u001b[38;5;66;03m# datetimelikes must match exactly\u001b[39;00m\n\u001b[0;32m   1482\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m needs_i8_conversion(lk\u001b[38;5;241m.\u001b[39mdtype) \u001b[38;5;129;01mand\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m needs_i8_conversion(rk\u001b[38;5;241m.\u001b[39mdtype):\n",
      "\u001b[1;31mValueError\u001b[0m: You are trying to merge on int64 and object columns for key '产品规格字典值'. If you wish to proceed you should use pd.concat"
     ]
    }
   ],
   "source": [
    "merged5_df2=pd.merge(merged4_df2, df_copy[['产品规格字典值','产品规格']], on='产品规格字典值', how='left')\n",
    "merged5_df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "c88ee1d7-af48-44b7-b60b-4e649f04143b",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged4_df2.to_excel(\"6.28_df2.xlsx\",index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5c1ce2e6-b246-460d-a98e-4ab65f33f3b2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
